package com.qf.smsplatform.eureka.feign.controller;

import com.qf.smsplatform.eureka.feign.feign.FeignClientInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author: 姜祖聪
 * date: 2019/9/24 10:45
 * description:
 */
@RestController
@RequestMapping("/consumer")
public class OrderController {

    @Autowired
    private FeignClientInterface feignClientInterface;

    @RequestMapping("/order")
    public void getOrder(String key, String value, Integer expireSecond){
        feignClientInterface.save(key,value,expireSecond);

    }

    @GetMapping("/get")
    public String getKey(String key){
        return feignClientInterface.getKey(key);

    }

    @RequestMapping("/test")
    public String test(){

        return feignClientInterface.test();
    }
}
